
/**
 * This interface represents a Cookie
 *
 */
@Author("David Schibl")
public abstract class Cookie {
	
	/**
	 * @return
	 * 		Returns a descriptive String of the cookie object.
	 */
	public abstract String toString ();
	
	/**
	 * Compares a provided cookie to the current cookie object by comparing their toString() results.
	 * 
	 * @param c
	 * 		Cookie object that should be compared to the current one.
	 * @return
	 * 		True, if the cookie objects are the same.
	 * 		False, if not.
	 */
	@Author("David Schibl")
	public boolean equals (Cookie c) {
		if(c==null) {
			return false;
		} else if(c.toString().equals(this.toString())) {
			return true;
		}
		
		return false;
	}
	
}
